# manual
# weekly_dates = '20200530-20200604'
# quarterly_dates = '20200513-20200604'
# duration = '24H'

from datetime import date
from datetime import timedelta

last_thursday = date.today() - timedelta(days=1)
while last_thursday.weekday() != 3:
    last_thursday = last_thursday - timedelta(days=1)

weekly_end = last_thursday
weekly_start = weekly_end - timedelta(days=5)
quarterly_end = date.today() - timedelta(days=1)
quarterly_start = date.today() - timedelta(days=31)

weekly_dates = f"{weekly_start.strftime('%Y%m%d')}-{weekly_end.strftime('%Y%m%d')}"
quarterly_dates = f"{quarterly_start.strftime('%Y%m%d')}-{quarterly_end.strftime('%Y%m%d')}"
duration = '24H'

